/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pruebas;

import java.util.Scanner;

/**
 *
 * @author ddpc
 */
public class tablamultiplicar {
    Scanner teclado;
    int a;
    public void iniciar(){
        teclado = new Scanner(System.in);
        System.out.println("Introduce numero:");
        a = teclado.nextInt();
    }
    public int getNumber(){
        return a;
    }
    public void multiplica(){
        for (int i = 0; i < 10; i++) {
            System.out.println(a+" * "+i+" = "+a*i);
        }
    }
    public static void main(String[] args) {
        tablamultiplicar x = new tablamultiplicar();
        while(true){
            x.iniciar();
            if(x.getNumber()!=-1){
                x.multiplica();
            }
            else{
                break;
            }
        }
    }
}
